var log = function(r){
    console.log(r)
};

var tools = require('./tools')



var model = require('./model')

var m = model


// m.user('ang','121345').consl()
// m.post('xuexue').consl()
// m.reply('zhaoyang').consl()
// m.discuz('yangbao').consl()


/////////////////////////////////////////

var config = require('./config')

// config.consl()

// tools.isInteger(123).consl()

// console.log(config.perPage_posts)

//////////
var req = {
    session:{
       beenLogin:0
    }
}
var res = {
    end:function(m){
        console.log(m)
    }
}

// console.log( tools.mustLogin(req,res) )

// var back = tools.safeString({a:'aaaa',b:'<>feafa'})
var p_p = {
    content:"<h3>[[sinam.com     ]]"
}

tools.SAFE_CONTENT(p_p)
console.log(p_p)


var md =tools.md5('eae23556')
log(md)

var sf = { 'pwd':'1324ad55'}
var sf_b = tools.SAFE_STRING(sf)
log(sf_b)

// var quanju =1111111111111111111
// tools.test()
var nd = new Date('Sun Jul 07 2019 22:17:09 GMT+0800 (中国标准时间)')
 var req = { ip:'1,2,3,4' }
tools.antiCrush.actionCounter(req);

var action = tools.antiCrush.checkAction(req,3,10000000000)
console.log(tools.antiCrush.ipList)
log(action)

const ObjectId= require('mongodb').ObjectID
log(new ObjectId)